3.2.38 \(\int \cot ^2(e+f x) (a+a \sin (e+f x))^m \, dx\) [138]

Optimal. Leaf size=89 \[ \frac {2 \sqrt {2} F_1\left (\frac {3}{2}+m;-\frac {1}{2},2;\frac {5}{2}+m;\frac {1}{2} (1+\sin (e+f x)),1+\sin (e+f x)\right ) \sec (e+f x) \sqrt {1-\sin (e+f x)} (a+a \sin (e+f x))^{2+m}}{a^2 f (3+2 m)} \]

[Out]

2*AppellF1(3/2+m,2,-1/2,5/2+m,1+sin(f*x+e),1/2+1/2*sin(f*x+e))*sec(f*x+e)*(a+a*sin(f*x+e))^(2+m)*2^(1/2)*(1-si
n(f*x+e))^(1/2)/a^2/f/(3+2*m)

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2798, 142, 141} \begin {gather*} \frac {2 \sqrt {2} \sqrt {1-\sin (e+f x)} \sec (e+f x) (a \sin (e+f x)+a)^{m+2} F_1\left (m+\frac {3}{2};-\frac {1}{2},2;m+\frac {5}{2};\frac {1}{2} (\sin (e+f x)+1),\sin (e+f x)+1\right )}{a^2 f (2 m+3)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^2*(a + a*Sin[e + f*x])^m,x]

[Out]

(2*Sqrt[2]*AppellF1[3/2 + m, -1/2, 2, 5/2 + m, (1 + Sin[e + f*x])/2, 1 + Sin[e + f*x]]*Sec[e + f*x]*Sqrt[1 - S
in[e + f*x]]*(a + a*Sin[e + f*x])^(2 + m))/(a^2*f*(3 + 2*m))

Rule 141

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[(b*e - a*f
)^p*((a + b*x)^(m + 1)/(b^(p + 1)*(m + 1)*(b/(b*c - a*d))^n))*AppellF1[m + 1, -n, -p, m + 2, (-d)*((a + b*x)/(
b*c - a*d)), (-f)*((a + b*x)/(b*e - a*f))], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] &&  !IntegerQ[m] &&  !Int
egerQ[n] && IntegerQ[p] && GtQ[b/(b*c - a*d), 0] &&  !(GtQ[d/(d*a - c*b), 0] && SimplerQ[c + d*x, a + b*x])

Rule 142

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_), x_Symbol] :> Dist[(c + d*x)^
FracPart[n]/((b/(b*c - a*d))^IntPart[n]*(b*((c + d*x)/(b*c - a*d)))^FracPart[n]), Int[(a + b*x)^m*(b*(c/(b*c -
 a*d)) + b*d*(x/(b*c - a*d)))^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] &&  !IntegerQ[m] &&
 !IntegerQ[n] && IntegerQ[p] &&  !GtQ[b/(b*c - a*d), 0] &&  !SimplerQ[c + d*x, a + b*x]

Rule 2798

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*tan[(e_.) + (f_.)*(x_)]^(p_), x_Symbol] :> Dist[Sqrt[a + b*Sin
[e + f*x]]*(Sqrt[a - b*Sin[e + f*x]]/(b*f*Cos[e + f*x])), Subst[Int[x^p*((a + x)^(m - (p + 1)/2)/(a - x)^((p +
 1)/2)), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && EqQ[a^2 - b^2, 0] &&  !IntegerQ[m] && Inte
gerQ[p/2]

Rubi steps

\begin {align*} \int \cot ^2(e+f x) (a+a \sin (e+f x))^m \, dx &=\frac {\left (\sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {a+a \sin (e+f x)}\right ) \text {Subst}\left (\int \frac {\sqrt {a-x} (a+x)^{\frac {1}{2}+m}}{x^2} \, dx,x,a \sin (e+f x)\right )}{a f}\\ &=\frac {\left (\sqrt {2} \sec (e+f x) (a-a \sin (e+f x)) \sqrt {a+a \sin (e+f x)}\right ) \text {Subst}\left (\int \frac {(a+x)^{\frac {1}{2}+m} \sqrt {\frac {1}{2}-\frac {x}{2 a}}}{x^2} \, dx,x,a \sin (e+f x)\right )}{a f \sqrt {\frac {a-a \sin (e+f x)}{a}}}\\ &=\frac {2 \sqrt {2} F_1\left (\frac {3}{2}+m;-\frac {1}{2},2;\frac {5}{2}+m;\frac {1}{2} (1+\sin (e+f x)),1+\sin (e+f x)\right ) \sec (e+f x) \sqrt {1-\sin (e+f x)} (a+a \sin (e+f x))^{2+m}}{a^2 f (3+2 m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 16.88, size = 5048, normalized size = 56.72 \begin {gather*} \text {Result too large to show} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[Cot[e + f*x]^2*(a + a*Sin[e + f*x])^m,x]

[Out]

Result too large to show

________________________________________________________________________________________

Maple [F]
time = 0.12, size = 0, normalized size = 0.00 \[\int \left (\cot ^{2}\left (f x +e \right )\right ) \left (a +a \sin \left (f x +e \right )\right )^{m}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^2*(a+a*sin(f*x+e))^m,x)

[Out]

int(cot(f*x+e)^2*(a+a*sin(f*x+e))^m,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2*(a+a*sin(f*x+e))^m,x, algorithm="maxima")

[Out]

integrate((a*sin(f*x + e) + a)^m*cot(f*x + e)^2, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2*(a+a*sin(f*x+e))^m,x, algorithm="fricas")

[Out]

integral((a*sin(f*x + e) + a)^m*cot(f*x + e)^2, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \cot ^{2}{\left (e + f x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**2*(a+a*sin(f*x+e))**m,x)

[Out]

Integral((a*(sin(e + f*x) + 1))**m*cot(e + f*x)**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2*(a+a*sin(f*x+e))^m,x, algorithm="giac")

[Out]

integrate((a*sin(f*x + e) + a)^m*cot(f*x + e)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {cot}\left (e+f\,x\right )}^2\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^2*(a + a*sin(e + f*x))^m,x)

[Out]

int(cot(e + f*x)^2*(a + a*sin(e + f*x))^m, x)

________________________________________________________________________________________